﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NutriLeaf.Web.Model;

namespace NutriLeaf.Web.Core.Articles
{
    interface IArticle
    {
          void InsertArticle(Model.Article article, ref NutriLeafDBEntities context);

          void InsertArticle(string articleTitle, string articleDescription, string articleText, int userId, int categoryId, bool IsApproved, ref NutriLeafDBEntities context);

          void ApproveArticle(int articleId, ref NutriLeafDBEntities context);

          void ApproveArticle(Model.Article article, ref NutriLeafDBEntities context);

          bool IsApproved(int articleId, ref NutriLeafDBEntities context);

          void UpdateArticle(Model.Article article, ref NutriLeafDBEntities context);

          List<Model.Article> GetArticlesWrittenByUser(int userId, ref NutriLeafDBEntities context);

          List<Model.Article> GetArticlesByCategory(Model.ArticleCategory category, ref NutriLeafDBEntities context);

          List<Model.Article> GetArticleByCategory(int categoryId, ref NutriLeafDBEntities context);

          void InsertCateogry(Model.ArticleCategory category, ref NutriLeafDBEntities context);

          void InsertCategory(string categoryName, string categoryDescription, int ParentCategoryID, ref NutriLeafDBEntities context);

          void RemoveCategory(int categoryId, ref NutriLeafDBEntities context);

          void RemoveCateogry(Model.ArticleCategory category, ref NutriLeafDBEntities context);

          void UpdateCateogry(Model.ArticleCategory category, ref NutriLeafDBEntities context);

          void LikeArticle(int articleId, int userId, bool like, ref NutriLeafDBEntities context);

          void LikeArticle(Model.Article article, User user, bool like, ref NutriLeafDBEntities context);

          void RemoveArticleLike(int likeId, ref NutriLeafDBEntities context);

          void RemoveArticleLike(Model.ArticleLike like, ref NutriLeafDBEntities context);

          List<Model.Article> GetArticlesLikedByUser(int userId, ref NutriLeafDBEntities context);

    }
}
